//
//  DYDaolanDetailHeadCell.swift
//  SheYangBigData
//
//  Created by 宋海胜 on 2021/1/5.
//  Copyright © 2021 叁拾叁. All rights reserved.
//

import UIKit

class DYDaolanDetailHeadCell: SYBaseCell {

    let nameLb: UILabel = {
        let v:UILabel = UILabel()
        v.textColor = UIColor(hex: 0x1E1E1E)
        v.font = 13.autoFontSize()
        return v
    }()
    
    let locationLb: UILabel = {
        let v:UILabel = UILabel()
        v.font = 12.autoFontSize()
        return v
    }()
    
    let pic: UIImageView = {
        let v: UIImageView = UIImageView()
        v.image = UIImage(named: "time")
        return v
    }()

    public func configureView() {
        pic.image = UIImage(named: "location_daolan")
    }
    
    override func initViews() {
        
        addSubview(nameLb)
        addSubview(locationLb)
        addSubview(pic)
        addSubview(lineView)
        nameLb.snp.makeConstraints { (make) in
            make.top.equalToSuperview().offset(autoWidth(12.0))
            make.bottom.equalToSuperview().offset(autoWidth(-12.0))
            make.left.equalTo(pic.snp.right).offset(autoWidth(12.0))
            make.right.lessThanOrEqualTo(locationLb.snp.left).offset(autoWidth(-12.0))
            make.height.equalTo(15.5.autoWidth())
        }
        locationLb.snp.makeConstraints { (make) in
            make.centerY.equalToSuperview()
            make.right.equalToSuperview().offset(autoWidth(-10.0))
            make.height.equalTo(15.5.autoWidth())
        }
        pic.snp.makeConstraints { (make) in
            make.centerY.equalToSuperview()
            make.left.equalToSuperview().offset(autoWidth(16.0))
            
        }
        lineView.snp.makeConstraints { (make) in
            make.bottom.equalToSuperview()
            make.left.equalToSuperview()
            make.right.equalToSuperview()
            make.height.equalTo(0.5.autoWidth())
        }
    }
}

